package com.yc.test;

import com.yc.bean.tb_order;
import com.yc.commons.DBHelper;
import com.yc.model.JsonModel;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;

/**
 * @author zwei
 * @create 2024-06-26 18:51
 */
public class test01 {
    public static void main(String[] args) throws InvocationTargetException, InstantiationException, IllegalAccessException {
        DBHelper db=new DBHelper();
        String nickname="xq";
        String sql="select id from tb_user where nickname=?";
        List<Map<String, Object>> result=db.select(sql,nickname);
        int user_id= (int) result.get(0).get("id");
        System.out.println(user_id);
    }
}
